home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
v8n07.arc
/
ALIGN.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-03-13
|
518b
|
24 lines
PROGRAM Alignment_demo;
{$A-}
VAR
X1 : Byte;
Y1 : Byte;
Z1 : Word ABSOLUTE X1;
VAR
X2 : Byte;
VAR
Y2 : Byte;
Z2 : Word ABSOLUTE X2;
dummy : byte;
BEGIN
FillChar(X2, Ofs(dummy) - Ofs(X1), $FF);
Z1 := $0101;
Z2 := $0202;
WriteLn('X1=',X1,' Y1=',Y1);
WriteLn('X2=',X2,' Y2=',Y2, ' (Y2 should equal 2)');
WriteLn('Note that the offsets below are all EVEN.');
WriteLn('Offset of X1=',Ofs(X1));
WriteLn('Offset of X2=',Ofs(X2));
WriteLn('Offset of Y2=',Ofs(Y2));
END.